$(function(){
	$("#zhuanfa_submit").live('click',function(){
		var tClick = $(this);
		/*获取微博id*/
		var weiboId = $(this).prevAll("#weibo_id").text();
		/*获取转发内容*/
		var tContent = $(this).prevAll("#zhuanfa_info").val();
		/*如果转发内容为空，则返回；后则提交*/
		if (!tContent)	{
			return false;
		}
		else {
			$.ajax({
				type: "POST",
				url: "php_ajax/transpond.php",
				dataType: "html",
				cache: "false",
				data: {t_content: tContent, w_id: weiboId},
				success: function(){
					tClick.prevAll("#zhuanfa_info").text("");
					tClick.parents("#zhuanfa_box").hide();
					tClick.parents("#zhuanfa_box").next("#transpond_face").hide();
					$("#mask").toggle();
					dataLoad();
					alert("转发成功");
				}
			});
		}
	});
	/*后台传数据到前台*/
	function dataLoad() {
		/*刷新微博*/
		$.ajax({
			type: "POST",
			url: "php_ajax/load_weibo.php",
			dataTpe: "html",
			cache: false,
			success: function(data){
				$("#weibo_box").empty().html(data);
			}
		});
		
		/*刷新微博数目*/
		$.ajax({
			type: "POST",
			url: "php_ajax/load_myWeibo_num.php",
			dataType: "html",
			cache: false,
			success: function(data){
				data = "微博" + data;
				$("#weiboNum_button a").empty().html(data);
			}
		});
	}
});